package com.haiya.observer.bellcase;

public class StudentEventListener implements BellEventListener {
    @Override
    public void heardBell(RingEvent event) {
        String sound = event.getSound();
        if (sound.equals("上课")) {
            System.out.println("学生们上课了~~~");
        } else if (sound.equals("下课")) {
            System.out.println("学生们下课了~~~");
        }
    }
}
